" keybindings of plugin

"⚠️ NERDTree
" Folder/File Tree
"autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
map <leader>ft :NERDTreeToggle<CR>

" nerdcommenter
" default keybinding
"<leader>cc
"<leader>cn
"<leader>c<space>
"<leader>cm
"<leader>cs
"<leader>cy
"<leader>c$
"<leader>cA
"<leader>ca
"<leader>cl
"<leader>cb
"<leader>cu

"⚠️ tagbar
" 将开启tagbar的快捷键设置为　<Leader>tb
nmap <Leader>tb :TagbarToggle<CR>

"⚠️ LeaderF
let g:Lf_NormalMap = {
    \ "File":   [["<ESC>", ':exec g:Lf_py "fileExplManager.quit()"<CR>']],
    \ "Buffer": [["<ESC>", ':exec g:Lf_py "bufExplManager.quit()"<CR>']],
    \ "Mru":    [["<ESC>", ':exec g:Lf_py "mruExplManager.quit()"<CR>']],
    \ "Tag":    [["<ESC>", ':exec g:Lf_py "tagExplManager.quit()"<CR>']],
    \ "Function":    [["<ESC>", ':exec g:Lf_py "functionExplManager.quit()"<CR>']],
    \ "Colorscheme":    [["<ESC>", ':exec g:Lf_py "colorschemeExplManager.quit()"<CR>']],
    \ }


"✅ vim-which-key
let g:mapleader = "\<Space>"
let g:maplocalleader = ','

let mapleader='<space>' 
" WhichKey leader mapping
nnoremap <silent> <space> :WhichKey <space><cr>
vnoremap <silent> <space> :WhichKeyVisual <space><cr>

" YOUR MAPPINGS HERE ======
let g:which_key_map['w'] = {
      \ 'name' : '+windows' ,
      \ 'w' : ['<C-W>w'     , 'other-window']          ,
      \ 'd' : ['<C-W>c'     , 'delete-window']         ,
      \ '-' : ['<C-W>s'     , 'split-window-below']    ,
      \ '|' : ['<C-W>v'     , 'split-window-right']    ,
      \ '2' : ['<C-W>v'     , 'layout-double-columns'] ,
      \ 'h' : ['<C-W>h'     , 'window-left']           ,
      \ 'j' : ['<C-W>j'     , 'window-below']          ,
      \ 'l' : ['<C-W>l'     , 'window-right']          ,
      \ 'k' : ['<C-W>k'     , 'window-up']             ,
      \ 'H' : ['<C-W>5<'    , 'expand-window-left']    ,
      \ 'J' : ['resize +5'  , 'expand-window-below']   ,
      \ 'L' : ['<C-W>5>'    , 'expand-window-right']   ,
      \ 'K' : ['resize -5'  , 'expand-window-up']      ,
      \ '=' : ['<C-W>='     , 'balance-window']        ,
      \ 's' : ['<C-W>s'     , 'split-window-below']    ,
      \ 'v' : ['<C-W>v'     , 'split-window-below']    ,
      \ '?' : ['Windows'    , 'fzf-window']            ,
      \ }


" bind WhichKey
call WhichKey#register("<space>", "g:which_key_map")

"⚠️ YankRing
"<leader>m选择上一个复制的文本
"let g:yankring_replace_n_pkey = '<Leader>m'
"<leader>n选择下一个复制的文本
"let g:yankring_replace_n_pkey = '<Leader>n'
"<leader>y显示yankring中的内容
"nmap <Leader>y :YRShow<CR>


"✅ UltiSnips引擎+自定义Snippet
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"

"⚠️ Goyo
nnoremap <c-8> :Goyo<cr>
nnoremap <c-1> :call SynGroup()<cr>


"
"
"
